package ysq.xyg.host.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 房产-楼盘报备实体类
 *
 * @author congcong tao
 * @date 2019-12-11 14:59:48
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_host_report")
public class HostReport implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 楼盘主键
     */ 
	@Column(name = "item_id")
	private String itemId;

	/**
     * 会员主键
     */ 
	@Column(name = "member_id")
	private String memberId;

	/**
     * 购房者姓名
     */ 
	@Column(name = "name")
	private String name;

	/**
     * 性别
     */ 
	@Column(name = "sex")
	private String sex;

	/**
     * 手机号
     */ 
	@Column(name = "phone")
	private String phone;

	/**
	 * 推荐人是否是本人
	 * 1=是2=否
	 */
	@Column(name = "is_recommend")
	private String isRecommend;

	/**
     * 推荐人姓名
     */ 
	@Column(name = "recommend_name")
	private String recommendName;

	/**
     * 推荐人手机
     */ 
	@Column(name = "recommend_phone")
	private String recommendPhone;

	/**
     * 看房时间
     */ 
	@Column(name = "use_time")
	private Date useTime;

	/**
     * 有效时间
     */ 
	@Column(name = "valid_time")
	private Date validTime;

	/**
     * 备注
     */ 
	@Column(name = "remarks")
	private String remarks;

	/**
     * 1、报备成功，2、客户到访，3、认筹确认，4、无效客户
     */ 
	@Column(name = "report_state")
	private String reportState;

	/**
     * 删除状态1、未删除2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	/**
	 * 客户到访时间
	 */
	@Column(name = "state_two_time")
	private Date stateTwoTime;

	/**
	 * 认筹确认时间
	 */
	@Column(name = "state_three_time")
	private Date stateThreeTime;

	/**
	 * 无效客户时间
	 */
	@Column(name = "state_four_time")
	private Date stateFourTime;

	/**
	 * 总金额
	 */
	@Column(name = "all_money")
	private String allMoney;

	/**
	 * 佣金
	 */
	@Column(name = "fee_money")
	private String feeMoney;

	@Transient
	private String itemName;

	public HostReport(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.updateTime = new Date();
	}
}